import request from '@/config/axios'

/** 人力-招聘-日报信息 */
export interface RecruitDaily {
  id: number; // id
  post: string; // 招聘岗位
  communicationNum: number; // 沟通数量
  replyNum: number; // 回复数量
  inviteNum: number; // 邀约数量
  prerequisiteUnconvertedNum: number; // 硬性条件未转化数量
  softConditionUnconvertedNum: number; // 软性条件未转化数量
  commutingUnconvertedNum: number; // 通勤未转化数量
  holidayUnconvertedNum: number; // 公休未转化数量
  remunerationUnconvertedNum: number; // 薪酬未转化数量
  socialSecurityUnconvertedNum: number; // 社保未转化数量
  otherSecurityUnconvertedNum: number; // 其他未转化数量
  visitorsNum: number; // 到面人数
  qualifiedNum: number; // 合格人数
  dutyNum: number; // 到岗人数
  remark: string; // 备注
}

// 人力-招聘-日报 API
export const RecruitDailyApi = {
  // 查询人力-招聘-日报分页
  getRecruitDailyPage: async (params: any) => {
    return await request.get({url: `/hr/recruit-daily/page`, params})
  },

  // 查询人力-招聘-日报详情
  getRecruitDaily: async (id: number) => {
    return await request.get({url: `/hr/recruit-daily/get?id=` + id})
  },

  // 新增人力-招聘-日报
  createRecruitDaily: async (data: RecruitDaily) => {
    return await request.post({url: `/hr/recruit-daily/create`, data})
  },

  // 批量新增人力-招聘-日报
  createRecruitDailyBatch: async (data: RecruitDaily[]) => {
    return await request.post({url: `/hr/recruit-daily/create-batch`, data})
  },

  // 修改人力-招聘-日报
  updateRecruitDaily: async (data: RecruitDaily) => {
    return await request.put({url: `/hr/recruit-daily/update`, data})
  },

  // 删除人力-招聘-日报
  deleteRecruitDaily: async (id: number) => {
    return await request.delete({url: `/hr/recruit-daily/delete?id=` + id})
  },

  /** 批量删除人力-招聘-日报 */
  deleteRecruitDailyList: async (ids: number[]) => {
    return await request.delete({url: `/hr/recruit-daily/delete-list?ids=${ids.join(',')}`})
  },

  // 导出人力-招聘-日报 Excel
  exportRecruitDaily: async (params) => {
    return await request.download({url: `/hr/recruit-daily/export-excel`, params})
  }
}
